//public class MainClass {
//    public static void main(String[] args) {
//        TV haierTV = new TV();
//        haierTV.setChannel(5);
//        System.out.println("haierTV 的频道是" + haierTV.getChannel());
//        Family zhangsSanFamily = new Family();
//        zhangsSanFamily.buyTV(haierTV);
//        System.out.println("zhangSanFamily 开始看电视节目: ");
//        zhangsSanFamily.seeTV();
//        int m = 2;
//        System.out.println("zhangSanFamily 将电视更换到" + m + "频道");
//        zhangsSanFamily.remoteControl(m);
//        System.out.println("haierTV 的频道是" + haierTV.getChannel());
//        System.out.println("zhangSanFamily 在看电视节目: ");
//        zhangsSanFamily.seeTV();
//    }
//}

//public class MainClass{
//    public static void main(String[] args) {
//        Village zhao, ma;
//        zhao = new Village("赵庄");
//        ma = new Village("马家河子");
//        zhao.peopleNumber = 100;
//        ma.peopleNumber = 150;
//        Village.treeAmout = 200;
//        int leftTree = Village.treeAmout;
//        System.out.println("森林中有 " +  leftTree + " 棵树");
//        zhao.treePlanting(50);
//        leftTree = ma.lookTreeAmount();
//        System.out.println("森林中有 " + leftTree + " 棵树");
//        zhao.fellTree(70);
//        leftTree = Village.lookTreeAmount();
//        System.out.println("森林中有 " + leftTree + " 棵树");
//        System.out.println("赵庄的人口:" + zhao.peopleNumber);
//        zhao.addPeopleNumber(12);
//        System.out.println("赵庄的人口:" + zhao.peopleNumber);
//        System.out.println("马家河子的人口:" + ma.peopleNumber);
//        ma.addPeopleNumber(10);
//        System.out.println("马家河子的人口:" + ma.peopleNumber);
//    }
//}

//public class MainClass {
//    public static void main(String[] args) {
//        Student zhang = new Student();
//        double area = zhang.area(new Rect(2, 3), new Circle(5.2), new Circle(12));
//        System.out.printf("两个圆和一个矩形图形的面积和:\n%10.3f", area);
//    }
//}

//public class MainClass {
//    public static void main(String[] args) {
//        Circle c1 = new Circle(100);
//        Circle c2 = new Circle(200);
//        System.out.println(c1.area() + "\t" + c1.perimeter());
//        System.out.println(c2.area() + "\t" + c2.perimeter());
//    }
//}

public class MainClass {
    public static void main(String[] args) {
        Student s1= new Student(101, "张三", 18);
        Student s2= new Student(102, "李四", 16);
        System.out.print("第1个学生的信息为: ");
        s1.showInfo();
        System.out.print("第2个学生的信息为: ");
        s2.showInfo();
        s1.modifyAge(20);
        System.out.print("修改后的第1个学生的信息为: ");
        s1.showInfo();
    }
}